<?php

namespace backend\models;

use Yii;

/**
 * This is the model class for table "biad_forum".
 *
 * @property integer $forumid
 * @property integer $display
 * @property string $type
 * @property integer $listorder
 * @property integer $parentid
 * @property string $name
 * @property string $icon
 * @property integer $datetime
 * @property string $moderator
 * @property integer $posts
 * @property integer $follows
 * @property integer $lastpost
 * @property string $intro
 * @property integer $recommend
 */
class Forum extends \base\BaseActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%Forum}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['display', 'listorder', 'parentid', 'datetime', 'posts', 'follows', 'lastpost', 'recommend'], 'integer'],
            [['type'], 'string', 'max' => 10],
            [['name', 'icon'], 'string', 'max' => 50],
            [['moderator'], 'string', 'max' => 150],
            [['intro'], 'string', 'max' => 300]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'forumid' => 'Forumid',
            'display' => 'Display',
            'type' => 'Type',
            'listorder' => 'Listorder',
            'parentid' => 'Parentid',
            'name' => 'Name',
            'icon' => 'Icon',
            'datetime' => 'Datetime',
            'moderator' => 'Moderator',
            'posts' => 'Posts',
            'follows' => 'Follows',
            'lastpost' => 'Lastpost',
            'intro' => 'Intro',
            'recommend' => 'Recommend',
        ];
    }
}
